package com.kevin.thread;

/**
 * 继承Thread类创建线程
 */
public class ExtendsThreadTest {
    public static void main(String[] args) {
        Thread.currentThread().setName("fuckMain");
        System.out.println("当前线程是："+Thread.currentThread().getName());
        new Thread1().start();
    }
}

class Thread1 extends Thread{
    int i = 9;
    @Override
    public void run() {
        System.out.println("当前线程是："+Thread.currentThread().getName());
    }
}
